﻿using UnityEngine;
using System.Collections;
using System.Text;
using System.Collections.Generic;

public class PotMono : MonoBehaviour
{
    private Vector3 speed = Vector3.zero;
    public void Start()
    {
        if (AvatarAction.SpeedList.ContainsKey(name))
        {
            speed = AvatarAction.SpeedList[name];
            AvatarAction.SpeedList.Remove(name);
        }
    }
    void FixedUpdate()
    {
        transform.position += speed;
    }
    void OnCollisionEnter(Collision collision)
    {
        foreach (ContactPoint contact in collision.contacts)
        {
            //Debug.DrawRay(contact.point, contact.normal, Color.white);
            //print("ok");
        }
        GameObject.Destroy(gameObject);
    }
}
